import { GLTFScene } from './jsx/allLiveEditors';
import { GLTFSceneHitmap } from './jsx/allLiveEditors';

# GLTFScene

`<GLTFScene />` provides support for loading and rendering [glTF models](https://www.khronos.org/gltf/). Only **Binary glTF** (`.glb`, without external resources) and basic color textures are currently supported.

## Props

| Name    | Type                               | Default                             | Description                                                                                                                                                                                                     |
| ------- | ---------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model` | `string | (() => Promise<Object>)` |                                     | URL of a `.glb` file to load, or an async function resolving to a loaded model. (A `parseGLB` function is also exported if you want custom logic for loading the model.) The file must define a single `scene`. |
| `pose`  | `Pose`                             | zero position, identity orientation | position and orientation at which to render the scene                                                                                                                                                           |
| `scale` | `Scale`                            | `{ x: 1, y: 1, z: 1 }`              | scale factor                                                                                                                                                                                                    |
| `alpha` | `number`                           | 1                                   | global opacity multiplier                                                                                                                                                                                       |

## Duck.glb

This example shows a common sample model from [KhronosGroup/glTF-Sample-Models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0).

<GLTFScene />

## Mouse Interaction

<GLTFSceneHitmap />
